import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class EGCupertinoAlertDialog extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    CupertinoAlertDialog dialog = CupertinoAlertDialog(
      title: Text("提示"),
      content: SingleChildScrollView(
        child: ListBody(
          children: <Widget>[Text("是否删除?"), Text("一旦数据删除不可恢复！")],
        ),
      ),
      actions: <Widget>[
        CupertinoDialogAction(
          child: Text("确定"),
          onPressed: () {},
        ),
        CupertinoDialogAction(child: Text("取消"), onPressed: () {})
      ],
    );
    return Scaffold(
      appBar: AppBar(
        title: Text("iOS风格对话框"),
      ),
      body: Center(child: dialog),
    );
  }
}
